<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var res = 0,str = '';
        for(var i = 1;i<100;i++){
            res+=i*(i+1);
            str+=i+'*'+(i+1)+'+';
        }
        console.log("S="+str.substring(0,str.length-1)+'='+res);
    </script>
</body>
</html>